import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import pn_sty from '@dfeidao/fd-w000010';
import p001 from './p001';

export default async function a003(fd: IFeidaoAiBrowserComponent, a: { page_no: number }) {
	// todo
	const pn = a.page_no || 1;
	const res = await nodejs('device-management-ygh/zj-000004/s001', {
		page: {
			page_no: Number(pn)
		}
	});
	console.log(res);
	render(fd, res, p001, 'p001', 'inner');
	const p = fd.data.node.querySelector<pn_sty>('[data-id="pn"]');
	p.setAttribute('page-no', pn + '');
}
